/**
 * 
 */
package br.com.sistransporte.transitedto.evento;

import br.com.src.dto.abstractdto.AbstractDTO;

/**
 * Classe que representa
 *
 *
 * @author Nelson Luis da Silva Junior <nelson.jr13@hotmail.com>
 * @since 18 de Set de 2013 01:03:23
 * @version 1.0
 */
public class EventoDTO extends AbstractDTO{
	
	/**
     * 
     */
    private static final long serialVersionUID = 4419312337322101038L;
	private String descricao;
	private String dataInicio;
	private String dataFinal;
	
	public EventoDTO(){}
	
	public EventoDTO(String id){
		super( id );
	}

	public EventoDTO( String id, String descricao, String dataInicio, String dataFinal ){
	    super( id );
	    setDescricao( descricao );
	    setDataInicio( dataInicio );
	    setDataFinal( dataFinal );
    }

	public String getDescricao() {
    	return descricao;
    }

	public void setDescricao( String descricao ) {
    	this.descricao = descricao;
    }

	public String getDataInicio() {
    	return dataInicio;
    }

	public void setDataInicio( String dataInicio ) {
    	this.dataInicio = dataInicio;
    }

	public String getDataFinal() {
    	return dataFinal;
    }

	public void setDataFinal( String dataFinal ) {
    	this.dataFinal = dataFinal;
    }

	@Override
    public String toString() {
	    return "EventoDTO [descricao=" + descricao + ", dataInicio=" + dataInicio + ", dataFinal=" + dataFinal + "]";
    }

	@Override
    public int hashCode() {
	    final int prime = 31;
	    int result = 1;
	    result = prime * result + ( ( dataFinal == null ) ? 0 : dataFinal.hashCode() );
	    result = prime * result + ( ( dataInicio == null ) ? 0 : dataInicio.hashCode() );
	    result = prime * result + ( ( descricao == null ) ? 0 : descricao.hashCode() );
	    return result;
    }

	@Override
    public boolean equals( Object obj ) {
	    if ( this == obj )
		    return true;
	    if ( obj == null )
		    return false;
	    if ( getClass() != obj.getClass() )
		    return false;
	    EventoDTO other = (EventoDTO) obj;
	    if ( dataFinal == null ) {
		    if ( other.dataFinal != null )
			    return false;
	    } else if ( !dataFinal.equals( other.dataFinal ) )
		    return false;
	    if ( dataInicio == null ) {
		    if ( other.dataInicio != null )
			    return false;
	    } else if ( !dataInicio.equals( other.dataInicio ) )
		    return false;
	    if ( descricao == null ) {
		    if ( other.descricao != null )
			    return false;
	    } else if ( !descricao.equals( other.descricao ) )
		    return false;
	    return true;
    }
}
